<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<base href="../../" />
		<script src="list.js"></script>
		<script src="page.js"></script>
		<link type="text/css" rel="stylesheet" href="page.css" />
	</head>
	<body>
		<h1>[name]</h1>

		<div class="desc">
			Represents a box or cube in 3D space. The main purpose of this is to represent
			the [link:https://en.wikipedia.org/wiki/Minimum_bounding_box Minimum Bounding Boxes]
			for objects.
		</div>


		<h2>Constructor</h2>


		<h3>[name]( [page:Vector3 min], [page:Vector3 max] )</h3>
		[page:Vector3 min] - (optional) [page:Vector3] representing the lower (x, y, z) boundary of the box.
		Default is ( + Infinity, + Infinity, + Infinity ).<br>

		[page:Vector3 max] - (optional) [page:Vector3] representing the lower upper (x, y, z) boundary of the box.
		Default is ( - Infinity, - Infinity, - Infinity ).<br /><br />

		Creates a [name] bounded by min and max.
		</div>

		<h2>Properties</h2>

		<h3>[property:Boolean isBox3]</h3>
		<div>
			Used to check whether this or derived classes are Box3s. Default is *true*.<br /><br />

			You should not change this, as it used internally for optimisation.
		</div>

		<h3>[property:Vector3 min]</h3>
		<div>
			[page:Vector3] representing the lower (x, y, z) boundary of the box.<br />
			Default is ( + Infinity, + Infinity, + Infinity ).
		</div>

		<h3>[property:Vector3 max]</h3>
		<div>
			[page:Vector3] representing the lower upper (x, y, z) boundary of the box.<br />
			Default is ( - Infinity, - Infinity, - Infinity ).
		</div>



		<h2>Methods</h2>

		<h3>[method:Box3 applyMatrix4]( [page:Matrix4 matrix] )</h3>
		<div>
		[page:Matrix4 matrix] - The [page:Matrix4] to apply<br /><br />

		Transforms this Box3 with the supplied matrix.
		</div>

		<h3>[method:Vector3 clampPoint]( [page:Vector3 point], [page:Vector3 optionalTarget] )</h3>
		<div>
		[page:Vector3 point] - [page:Vector3] to clamp. <br>
		[page:Vector3 optionalTarget] — (optional) if specified, the result will be copied into this Vector3,
		otherwise a new Vector3 will be created. <br /><br />

		[link:https://en.wikipedia.org/wiki/Clamping_(graphics) Clamps] the [page:Vector3 point] within the bounds of this box.<br />
		</div>

		<h3>[method:Box3 clone]()</h3>
		<div>Returns a new [page:Box3] with the same [page:.min min] and [page:.max max] as this one.</div>

		<h3>[method:Boolean containsBox]( [page:Box3 box] )</h3>
		<div>
		[page:Box3 box] - [page:Box3 Box3] to test for inclusion.<br /><br />

		Returns true if this box includes the entirety of [page:Box3 box]. If this and [page:Box3 box] are identical, <br>
		this function also returns true.
		</div>

		<h3>[method:Boolean containsPoint]( [page:Vector3 point] )</h3>
		<div>
		[page:Vector3 point] - [page:Vector3] to check for inclusion.<br /><br />

		Returns true if the specified [page:Vector3 point] lies within or on the boundaries of this box.
		</div>

		<h3>[method:Box3 copy]( [page:Box3 box] )</h3>
		<div>
		[page:Box3 box]  - [page:Box3] to copy.<br /><br />

		Copies the [page:.min min] and [page:.max max] from [page:Box3 box] to this box.
		</div>

		<h3>[method:Float distanceToPoint]( [page:Vector3 point] )</h3>
		<div>
		[page:Vector3 point] - [page:Vector3] to measure distance to.<br /><br />

		Returns the distance from any edge of this box to the specified point.
		If the [page:Vector3 point] lies inside of this box, the distance will be 0.
		</div>


		<h3>[method:Boolean equals]( [page:Box3 box] )</h3>
		<div>
		[page:Box3 box] - Box to compare with this one.<br /><br />

		Returns true if this box and [page:Box3 box] share the same lower and upper bounds.
		</div>

		<h3>[method:Box3 expandByObject]( [page:Object3D object] )</h3>
		<div>
		[page:Object3D object] - [page:Object3D] to expand the box by.<br /><br />

		Expands the boundaries of this box to include [page:Object3D object] and its children,
		accounting for the object's, and children's, world transforms.

		</div>

		<h3>[method:Box3 expandByPoint]( [page:Vector3 point] )</h3>
		<div>
		[page:Vector3 point] - [page:Vector3] that should be included in the box.<br /><br />

		Expands the boundaries of this box to include [page:Vector3 point].
		</div>

		<h3>[method:Box3 expandByScalar]( [page:float scalar] )</h3>
		<div>
		[page:float scalar] - Distance to expand the box by.<br /><br />

		Expands each dimension of the box by [page:float scalar]. If negative, the dimensions of the box
		will be contracted.
		</div>

		<h3>[method:Box3 expandByVector]( [page:Vector3 vector] )</h3>
		<div>
		[page:Vector3 vector] - [page:Vector3] to expand the box by.<br /><br />

		Expands this box equilaterally by [page:Vector3 vector]. The width of this box will be
		expanded by the x component of [page:Vector3 vector] in both directions. The height of
		this box will be expanded by the y component of [page:Vector3 vector] in both directions.
		The depth of this box will be expanded by the z component of *vector* in both directions.
		</div>

		<h3>[method:Sphere getBoundingSphere]( [page:Sphere optionalTarget] )</h3>
		<div>
			[page:Sphere optionalTarget] — (optional) if specified, the result will be copied into this Sphere,
			otherwise a new Sphere will be created. <br /><br />

		Gets a [page:Sphere] that bounds the box.
		</div>

		<h3>[method:Vector3 getCenter]( [page:Vector3 optionalTarget] )</h3>
		<div>
			[page:Vector3 optionalTarget] — (optional) if specified, the result will be copied into this Vector3,
			otherwise a new Vector3 will be created. <br /><br />

		Returns the center point of the box as a [page:Vector3].
		</div>

		<h3>[method:Vector3 getParameter]( [page:Vector3 point], [page:Vector3 optionalTarget] ) </h3>
		<div>
		[page:Vector3 point] - [page:Vector3].<br/>
		[page:Vector3 optionalTarget] — (optional) if specified, the result will be copied into this Vector3,
		otherwise a new Vector3 will be created. <br /><br />

		Returns a point as a proportion of this box's width and height.
		</div>

		<h3>[method:Vector3 getSize]( [page:Vector3 optionalTarget] )</h3>
		<div>
			[page:Vector3 optionalTarget] — (optional) if specified, the result will be copied into this Vector3,
			otherwise a new Vector3 will be created. <br /><br />

		Returns the width, height and depth of this box.
		</div>

		<h3>[method:Box3 intersect]( [page:Box3 box] )</h3>
		<div>
		[page:Box3 box] - Box to intersect with.<br /><br />

		Returns the intersection of this and [page:Box3 box], setting the upper bound of this box to the lesser
		of the two boxes' upper bounds and the lower bound of this box to the greater of the two boxes'
		lower bounds.
		</div>

		<h3>[method:Boolean intersectsBox]( [page:Box3 box] )</h3>
		<div>
		[page:Box3 box] - Box to check for intersection against.<br /><br />

		Determines whether or not this box intersects [page:Box3 box].
		</div>

		<h3>[method:Boolean intersectsPlane]( [page:Plane plane] )</h3>
		<div>
		[page:Plane plane] - [page:Plane] to check for intersection against.<br /><br />

		Determines whether or not this box intersects [page:Plane plane].
		</div>

		<h3>[method:Boolean intersectsSphere]( [page:Sphere sphere] )</h3>
		<div>
		[page:Sphere sphere] - [page:Sphere] to check for intersection against.<br /><br />

		Determines whether or not this box intersects [page:Sphere sphere].
		</div>

		<h3>[method:Boolean isEmpty]()</h3>
		<div>
		Returns true if this box includes zero points within its bounds.<br>
		Note that a box with equal lower and upper bounds still includes one point,
		the one both bounds share.
		</div>

		<h3>[method:Box3 makeEmpty]()</h3>
		<div>Makes this box empty.</div>

		<h3>[method:Box3 set]( [page:Vector3 min], [page:Vector3 max] )</h3>
		<div>
		[page:Vector3 min] - [page:Vector3] representing the lower (x, y, z) boundary of the box.<br />
		[page:Vector3 max] - [page:Vector3] representing the lower upper (x, y, z) boundary of the box.<br /><br />

		Sets the lower and upper (x, y, z) boundaries of this box.
		</div>

		<h3>[method:Box3 setFromArray]( [page:Array array] ) [page:Box3 this]</h3>
		<div>
		array -- An array of position data that the resulting box will envelop.<br /><br />

		Sets the upper and lower bounds of this box to include all of the data in *array*.
		</div>

		<h3>[method:Box3 setFromBufferAttribute]( [page:BufferAttribute attribute] ) [page:Box3 this]</h3>
		<div>
		[page:BufferAttribute attribute] - A buffer attribute of position data that the resulting box will envelop.<br /><br />

		Sets the upper and lower bounds of this box to include all of the data in [page:BufferAttribute attribute].
		</div>

		<h3>[method:Box3 setFromCenterAndSize]( [page:Vector3 center], [page:Vector3 size] )</h3>
		<div>
		[page:Vector3 center] - Desired center position of the box ([page:Vector3]). <br>
		[page:Vector3 size] - Desired x and y dimensions of the box ([page:Vector3]).<br /><br />

		Centers this box on [page:Vector3 center] and sets this box's width and height to the values specified
		in [page:Vector3 size].
		</div>

		<h3>[method:Box3 setFromCenterAndSize]( [page:Vector3 center], [page:Vector3 size] ) [page:Box3 this]</h3>
		<div>
		[page:Vector3 center], - Desired center position of the box. <br>
		[page:Vector3 size] - Desired x, y and z dimensions of the box.<br /><br />

		Centers this box on [page:Vector3 center] and sets this box's width, height and depth to the values specified <br>
		in [page:Vector3 size]
		</div>

		<h3>[method:Box3 setFromObject]( [page:Object3D object] )</h3>
		<div>
		[page:Object3D object] - [page:Object3D] to compute the bounding box of.<br /><br />

		Computes the world-axis-aligned bounding box of an [page:Object3D] (including its children),
		accounting for the object's, and children's, world transforms.

		</div>

		<h3>[method:Box3 setFromPoints]( [page:Array points] )</h3>
		<div>
		[page:Array points] - Array of [page:Vector3 Vector3s] that the resulting box will contain.<br /><br />

		Sets the upper and lower bounds of this box to include all of the points in [page:Array points].
		</div>

		<h3>[method:Box3 translate]( [page:Vector3 offset] )</h3>
		<div>
		[page:Vector3 offset] - Direction and distance of offset.<br /><br />

		Adds [page:Vector3 offset] to both the upper and lower bounds of this box, effectively moving this box
		[page:Vector3 offset] units in 2D space.
		</div>

		<h3>[method:Box3 union]( [page:Box3 box] )</h3>
		<div>
		[page:Box3 box] - Box that will be unioned with this box.<br /><br />

		Unions this box with [page:Box3 box], setting the upper bound of this box to the greater of the
		two boxes' upper bounds and the lower bound of this box to the lesser of the two boxes'
		lower bounds.
		</div>

		<h2>Source</h2>

		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
	</body>
</html>
